home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13726 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: cpsc.ucalgary.ca!davidt
  2. From: davidt@cpsc.ucalgary.ca (David Taylor)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: cout escape sequences
  5. Date: 26 Mar 1996 22:26:09 GMT
  6. Organization: University of Calgary CPSC
  7. Message-ID: <4j9qu1$rvg@linux.cpsc.ucalgary.ca>
  8. References: <3152EDB3.32AE@legendcomm.com>
  9. NNTP-Posting-Host: fsj.cpsc.ucalgary.ca
  10.  
  11. In article <3152EDB3.32AE@legendcomm.com>,
  12. Karl Strauss  <karl@legendcomm.com> wrote:
  13. >I was wondering if there were more escape sequences to use with 
  14. >cout. I know of \n,\t.
  15. >
  16. >Are there some others? Specifically for making text bold or 
  17. >making it reverse text?
  18. >
  19.  
  20. Yes, there are some others.  \r is a carriage return and \a is the
  21. bell.  \xxx where xxx is an octal number will output the ascii
  22. character cooresponding to that number.  A good C or C++ reference
  23. manual will list them all.
  24.  
  25. Bold and reverse cannot be done in a platform independent manner with
  26. cout.  If you are on a Unix machine, tgetent(3) and tgetstr(3) will
  27. allow you to do this; see "man termcap" for more details.
  28.  
  29. -- 
  30. Andrew Taylor     |email: davidt@cpsc.ucalgary.ca
  31.                   |www:   http://www.cpsc.ucalgary.ca/~davidt
  32.